package com.myspace.service.impl.post;

import com.myspace.mapper.PostMapper;
import com.myspace.service.space.post.DeletePostService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

@Service
public class DeletePostServiceImpl implements DeletePostService {
    @Autowired
    private PostMapper postMapper;

    @Override
    public Map<String, String> deletepost(Integer postId) {
        postMapper.deleteById(postId);
        Map<String, String> map = new HashMap<>();
        map.put("error_message", "success");

        return map;
    }
}
